package com.sxkiler.demo.seata.controller;

import com.sxkiler.demo.seata.dto.BusinessDTO;
import com.sxkiler.demo.seata.service.tcc.TCCBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/business/tcc")
public class TCCBusinessController {

    @Autowired
    TCCBusinessService businessService;

    @RequestMapping("/buy")
    public String handleBusiness(@RequestBody BusinessDTO businessDTO){
        return businessService.handleBusiness(businessDTO);
    }
}
